Learn R Programming

rfml (version 0.1.0)

$<-,ml.data.frame-method: Adds a new ml.data.frame field as a ml.col.def-class

Description

The fields only exists within the object and are not created at the database side.

Usage

"$"(x, name) <- value

Arguments

x
A ml.data.frame object
name
Name of the new field
value
The value for the new field. Typical a expression

Value

ml.col.def-class object

Examples

Run this code
## Not run: 
#  library(rfml)
#  locConn <- ml.connect()
#  # create a ml.data.frame based on the iris data set
#  mlIris <- as.ml.data.frame(locConn, iris, "iris")
#  # create a field based on an existing
#  mlIris$newField <- mlIris$Petal.Width
#  # create a field based calculation on existing
#  mlIris$newField2 <- mlIris$Petal.Width + mlIris$Petal.Length
#  # create a field based on an previous created
#  mlIris$newField3 <- mlIris$Petal.Width + 10
#  mlIris$abs_width <- abs(mlIris$Petal.Width)
# ## End(Not run)

Run the code above in your browser using DataLab